import baseUrl from '@/api/baseUrl'
import http from '@/api/http'

const root = '/images'

export function getUrl (id) {
  return baseUrl + '/' + root + '/' + id
}

/**
 * 查询图片
 * @param {Object} query 查询参数
 */
export function list (query) {
  return http({
    url: root + '/list',
    method: 'post',
    data: query
  })
}

/**
 * 删除图片
 * @param {String}} id 图片id
 */
export function deleteImage (id) {
  return http({
    url: root + '/' + id,
    method: 'delete'
  })
}
